\(\int \frac {\cos ^4(c+d x)}{(a+b \cos (c+d x))^4} \, dx\) [479]
Optimal result
Integrand size = 21, antiderivative size = 250 \[
\int \frac {\cos ^4(c+d x)}{(a+b \cos (c+d x))^4} \, dx=\frac {x}{b^4}-\frac {a \left (2 a^6-7 a^4 b^2+8 a^2 b^4-8 b^6\right ) \arctan \left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{(a-b)^{7/2} b^4 (a+b)^{7/2} d}-\frac {a^2 \cos ^2(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^3}+\frac {a^3 \left (3 a^2-8 b^2\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))^2}-\frac {a^2 \left (9 a^4-28 a^2 b^2+34 b^4\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^3 d (a+b \cos (c+d x))}
\]
[Out]
x/b^4-a*(2*a^6-7*a^4*b^2+8*a^2*b^4-8*b^6)*arctan((a-b)^(1/2)*tan(1/2*d*x+1/2*c)/(a+b)^(1/2))/(a-b)^(7/2)/b^4/(
a+b)^(7/2)/d-1/3*a^2*cos(d*x+c)^2*sin(d*x+c)/b/(a^2-b^2)/d/(a+b*cos(d*x+c))^3+1/6*a^3*(3*a^2-8*b^2)*sin(d*x+c)
/b^3/(a^2-b^2)^2/d/(a+b*cos(d*x+c))^2-1/6*a^2*(9*a^4-28*a^2*b^2+34*b^4)*sin(d*x+c)/b^3/(a^2-b^2)^3/d/(a+b*cos(
d*x+c))
Rubi [A] (verified)
Time = 0.65 (sec) , antiderivative size = 250, normalized size of antiderivative = 1.00, number of
steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {2871, 3110, 3100, 2814, 2738,
211} \[
\int \frac {\cos ^4(c+d x)}{(a+b \cos (c+d x))^4} \, dx=-\frac {a^2 \sin (c+d x) \cos ^2(c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^3}-\frac {a^2 \left (9 a^4-28 a^2 b^2+34 b^4\right ) \sin (c+d x)}{6 b^3 d \left (a^2-b^2\right )^3 (a+b \cos (c+d x))}+\frac {a^3 \left (3 a^2-8 b^2\right ) \sin (c+d x)}{6 b^3 d \left (a^2-b^2\right )^2 (a+b \cos (c+d x))^2}-\frac {a \left (2 a^6-7 a^4 b^2+8 a^2 b^4-8 b^6\right ) \arctan \left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{b^4 d (a-b)^{7/2} (a+b)^{7/2}}+\frac {x}{b^4}
\]
[In]
Int[Cos[c + d*x]^4/(a + b*Cos[c + d*x])^4,x]
[Out]
x/b^4 - (a*(2*a^6 - 7*a^4*b^2 + 8*a^2*b^4 - 8*b^6)*ArcTan[(Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[a + b]])/((a - b
)^(7/2)*b^4*(a + b)^(7/2)*d) - (a^2*Cos[c + d*x]^2*Sin[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^3) +
(a^3*(3*a^2 - 8*b^2)*Sin[c + d*x])/(6*b^3*(a^2 - b^2)^2*d*(a + b*Cos[c + d*x])^2) - (a^2*(9*a^4 - 28*a^2*b^2 +
34*b^4)*Sin[c + d*x])/(6*b^3*(a^2 - b^2)^3*d*(a + b*Cos[c + d*x]))
Rule 211
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]
Rule 2738
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[2*(e/d), Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]
Rule 2814
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[b*(x/d)
, x] - Dist[(b*c - a*d)/d, Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d
, 0]
Rule 2871
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Si
mp[(-(b^2*c^2 - 2*a*b*c*d + a^2*d^2))*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m - 2)*((c + d*Sin[e + f*x])^(n + 1)/
(d*f*(n + 1)*(c^2 - d^2))), x] + Dist[1/(d*(n + 1)*(c^2 - d^2)), Int[(a + b*Sin[e + f*x])^(m - 3)*(c + d*Sin[e
+ f*x])^(n + 1)*Simp[b*(m - 2)*(b*c - a*d)^2 + a*d*(n + 1)*(c*(a^2 + b^2) - 2*a*b*d) + (b*(n + 1)*(a*b*c^2 +
c*d*(a^2 + b^2) - 3*a*b*d^2) - a*(n + 2)*(b*c - a*d)^2)*Sin[e + f*x] + b*(b^2*(c^2 - d^2) - m*(b*c - a*d)^2 +
d*n*(2*a*b*c - d*(a^2 + b^2)))*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
&& NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 2] && LtQ[n, -1] && (IntegerQ[m] || IntegersQ[2*m, 2*n])
Rule 3100
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f
_.)*(x_)]^2), x_Symbol] :> Simp[(-(A*b^2 - a*b*B + a^2*C))*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m
+ 1)*(a^2 - b^2))), x] + Dist[1/(b*(m + 1)*(a^2 - b^2)), Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[b*(a*A - b*B +
a*C)*(m + 1) - (A*b^2 - a*b*B + a^2*C + b*(A*b - a*B + b*C)*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b,
e, f, A, B, C}, x] && LtQ[m, -1] && NeQ[a^2 - b^2, 0]
Rule 3110
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])*((A_.) + (B_.)*sin[(e
_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(b*c - a*d))*(A*b^2 - a*b*B + a^2*C)
*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b^2*f*(m + 1)*(a^2 - b^2))), x] - Dist[1/(b^2*(m + 1)*(a^2 - b^2)
), Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[b*(m + 1)*((b*B - a*C)*(b*c - a*d) - A*b*(a*c - b*d)) + (b*B*(a^2*d +
b^2*d*(m + 1) - a*b*c*(m + 2)) + (b*c - a*d)*(A*b^2*(m + 2) + C*(a^2 + b^2*(m + 1))))*Sin[e + f*x] - b*C*d*(m
+ 1)*(a^2 - b^2)*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b*c - a*d, 0] &&
NeQ[a^2 - b^2, 0] && LtQ[m, -1]
Rubi steps \begin{align*}
\text {integral}& = -\frac {a^2 \cos ^2(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^3}-\frac {\int \frac {\cos (c+d x) \left (2 a^2-3 a b \cos (c+d x)-3 \left (a^2-b^2\right ) \cos ^2(c+d x)\right )}{(a+b \cos (c+d x))^3} \, dx}{3 b \left (a^2-b^2\right )} \\ & = -\frac {a^2 \cos ^2(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^3}+\frac {a^3 \left (3 a^2-8 b^2\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))^2}-\frac {\int \frac {2 a^2 b \left (3 a^2-8 b^2\right )+a \left (3 a^4-10 a^2 b^2+12 b^4\right ) \cos (c+d x)-6 b \left (a^2-b^2\right )^2 \cos ^2(c+d x)}{(a+b \cos (c+d x))^2} \, dx}{6 b^3 \left (a^2-b^2\right )^2} \\ & = -\frac {a^2 \cos ^2(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^3}+\frac {a^3 \left (3 a^2-8 b^2\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))^2}-\frac {a^2 \left (9 a^4-28 a^2 b^2+34 b^4\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^3 d (a+b \cos (c+d x))}+\frac {\int \frac {3 a b^2 \left (a^4-2 a^2 b^2+6 b^4\right )+6 b \left (a^2-b^2\right )^3 \cos (c+d x)}{a+b \cos (c+d x)} \, dx}{6 b^4 \left (a^2-b^2\right )^3} \\ & = \frac {x}{b^4}-\frac {a^2 \cos ^2(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^3}+\frac {a^3 \left (3 a^2-8 b^2\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))^2}-\frac {a^2 \left (9 a^4-28 a^2 b^2+34 b^4\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^3 d (a+b \cos (c+d x))}-\frac {\left (a \left (2 a^6-7 a^4 b^2+8 a^2 b^4-8 b^6\right )\right ) \int \frac {1}{a+b \cos (c+d x)} \, dx}{2 b^4 \left (a^2-b^2\right )^3} \\ & = \frac {x}{b^4}-\frac {a^2 \cos ^2(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^3}+\frac {a^3 \left (3 a^2-8 b^2\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))^2}-\frac {a^2 \left (9 a^4-28 a^2 b^2+34 b^4\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^3 d (a+b \cos (c+d x))}-\frac {\left (a \left (2 a^6-7 a^4 b^2+8 a^2 b^4-8 b^6\right )\right ) \text {Subst}\left (\int \frac {1}{a+b+(a-b) x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{b^4 \left (a^2-b^2\right )^3 d} \\ & = \frac {x}{b^4}-\frac {a \left (2 a^6-7 a^4 b^2+8 a^2 b^4-8 b^6\right ) \arctan \left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{(a-b)^{7/2} b^4 (a+b)^{7/2} d}-\frac {a^2 \cos ^2(c+d x) \sin (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^3}+\frac {a^3 \left (3 a^2-8 b^2\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))^2}-\frac {a^2 \left (9 a^4-28 a^2 b^2+34 b^4\right ) \sin (c+d x)}{6 b^3 \left (a^2-b^2\right )^3 d (a+b \cos (c+d x))} \\
\end{align*}
Mathematica [A] (verified)
Time = 2.03 (sec) , antiderivative size = 227, normalized size of antiderivative = 0.91
\[
\int \frac {\cos ^4(c+d x)}{(a+b \cos (c+d x))^4} \, dx=\frac {6 (c+d x)-\frac {6 a \left (2 a^6-7 a^4 b^2+8 a^2 b^4-8 b^6\right ) \text {arctanh}\left (\frac {(a-b) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a^2+b^2}}\right )}{\left (-a^2+b^2\right )^{7/2}}-\frac {2 a^4 b \sin (c+d x)}{(a-b) (a+b) (a+b \cos (c+d x))^3}+\frac {a^3 b \left (7 a^2-12 b^2\right ) \sin (c+d x)}{(a-b)^2 (a+b)^2 (a+b \cos (c+d x))^2}+\frac {a^2 b \left (-11 a^4+32 a^2 b^2-36 b^4\right ) \sin (c+d x)}{(a-b)^3 (a+b)^3 (a+b \cos (c+d x))}}{6 b^4 d}
\]
[In]
Integrate[Cos[c + d*x]^4/(a + b*Cos[c + d*x])^4,x]
[Out]
(6*(c + d*x) - (6*a*(2*a^6 - 7*a^4*b^2 + 8*a^2*b^4 - 8*b^6)*ArcTanh[((a - b)*Tan[(c + d*x)/2])/Sqrt[-a^2 + b^2
]])/(-a^2 + b^2)^(7/2) - (2*a^4*b*Sin[c + d*x])/((a - b)*(a + b)*(a + b*Cos[c + d*x])^3) + (a^3*b*(7*a^2 - 12*
b^2)*Sin[c + d*x])/((a - b)^2*(a + b)^2*(a + b*Cos[c + d*x])^2) + (a^2*b*(-11*a^4 + 32*a^2*b^2 - 36*b^4)*Sin[c
+ d*x])/((a - b)^3*(a + b)^3*(a + b*Cos[c + d*x])))/(6*b^4*d)
Maple [A] (verified)
Time = 1.75 (sec) , antiderivative size = 361, normalized size of antiderivative = 1.44
| | |
method | result | size |
| | |
derivativedivides |
\(\frac {\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{4}}-\frac {2 a \left (\frac {\frac {\left (2 a^{4}-a^{3} b -6 a^{2} b^{2}+4 a \,b^{3}+12 b^{4}\right ) a b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 \left (a -b \right ) \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}+\frac {2 \left (3 a^{4}-11 a^{2} b^{2}+18 b^{4}\right ) a b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 \left (a^{2}-2 a b +b^{2}\right ) \left (a^{2}+2 a b +b^{2}\right )}+\frac {\left (2 a^{4}+a^{3} b -6 a^{2} b^{2}-4 a \,b^{3}+12 b^{4}\right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}}{{\left (\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a +b \right )}^{3}}+\frac {\left (2 a^{6}-7 a^{4} b^{2}+8 a^{2} b^{4}-8 b^{6}\right ) \arctan \left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{2 \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{b^{4}}}{d}\) |
\(361\) |
default |
\(\frac {\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{b^{4}}-\frac {2 a \left (\frac {\frac {\left (2 a^{4}-a^{3} b -6 a^{2} b^{2}+4 a \,b^{3}+12 b^{4}\right ) a b \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 \left (a -b \right ) \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}+\frac {2 \left (3 a^{4}-11 a^{2} b^{2}+18 b^{4}\right ) a b \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 \left (a^{2}-2 a b +b^{2}\right ) \left (a^{2}+2 a b +b^{2}\right )}+\frac {\left (2 a^{4}+a^{3} b -6 a^{2} b^{2}-4 a \,b^{3}+12 b^{4}\right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}}{{\left (\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a +b \right )}^{3}}+\frac {\left (2 a^{6}-7 a^{4} b^{2}+8 a^{2} b^{4}-8 b^{6}\right ) \arctan \left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{2 \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{b^{4}}}{d}\) |
\(361\) |
risch |
\(\text {Expression too large to display}\) |
\(1051\) |
| | |
|
|
|
[In]
int(cos(d*x+c)^4/(a+cos(d*x+c)*b)^4,x,method=_RETURNVERBOSE)
[Out]
1/d*(2/b^4*arctan(tan(1/2*d*x+1/2*c))-2*a/b^4*((1/2*(2*a^4-a^3*b-6*a^2*b^2+4*a*b^3+12*b^4)*a*b/(a-b)/(a^3+3*a^
2*b+3*a*b^2+b^3)*tan(1/2*d*x+1/2*c)^5+2/3*(3*a^4-11*a^2*b^2+18*b^4)*a*b/(a^2-2*a*b+b^2)/(a^2+2*a*b+b^2)*tan(1/
2*d*x+1/2*c)^3+1/2*(2*a^4+a^3*b-6*a^2*b^2-4*a*b^3+12*b^4)*a*b/(a+b)/(a^3-3*a^2*b+3*a*b^2-b^3)*tan(1/2*d*x+1/2*
c))/(tan(1/2*d*x+1/2*c)^2*a-b*tan(1/2*d*x+1/2*c)^2+a+b)^3+1/2*(2*a^6-7*a^4*b^2+8*a^2*b^4-8*b^6)/(a^6-3*a^4*b^2
+3*a^2*b^4-b^6)/((a-b)*(a+b))^(1/2)*arctan((a-b)*tan(1/2*d*x+1/2*c)/((a-b)*(a+b))^(1/2))))
Fricas [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 688 vs. \(2 (235) = 470\).
Time = 0.36 (sec) , antiderivative size = 1445, normalized size of antiderivative = 5.78
\[
\int \frac {\cos ^4(c+d x)}{(a+b \cos (c+d x))^4} \, dx=\text {Too large to display}
\]
[In]
integrate(cos(d*x+c)^4/(a+b*cos(d*x+c))^4,x, algorithm="fricas")
[Out]
[1/12*(12*(a^8*b^3 - 4*a^6*b^5 + 6*a^4*b^7 - 4*a^2*b^9 + b^11)*d*x*cos(d*x + c)^3 + 36*(a^9*b^2 - 4*a^7*b^4 +
6*a^5*b^6 - 4*a^3*b^8 + a*b^10)*d*x*cos(d*x + c)^2 + 36*(a^10*b - 4*a^8*b^3 + 6*a^6*b^5 - 4*a^4*b^7 + a^2*b^9)
*d*x*cos(d*x + c) + 12*(a^11 - 4*a^9*b^2 + 6*a^7*b^4 - 4*a^5*b^6 + a^3*b^8)*d*x - 3*(2*a^10 - 7*a^8*b^2 + 8*a^
6*b^4 - 8*a^4*b^6 + (2*a^7*b^3 - 7*a^5*b^5 + 8*a^3*b^7 - 8*a*b^9)*cos(d*x + c)^3 + 3*(2*a^8*b^2 - 7*a^6*b^4 +
8*a^4*b^6 - 8*a^2*b^8)*cos(d*x + c)^2 + 3*(2*a^9*b - 7*a^7*b^3 + 8*a^5*b^5 - 8*a^3*b^7)*cos(d*x + c))*sqrt(-a^
2 + b^2)*log((2*a*b*cos(d*x + c) + (2*a^2 - b^2)*cos(d*x + c)^2 - 2*sqrt(-a^2 + b^2)*(a*cos(d*x + c) + b)*sin(
d*x + c) - a^2 + 2*b^2)/(b^2*cos(d*x + c)^2 + 2*a*b*cos(d*x + c) + a^2)) - 2*(6*a^10*b - 23*a^8*b^3 + 43*a^6*b
^5 - 26*a^4*b^7 + (11*a^8*b^3 - 43*a^6*b^5 + 68*a^4*b^7 - 36*a^2*b^9)*cos(d*x + c)^2 + 15*(a^9*b^2 - 4*a^7*b^4
+ 7*a^5*b^6 - 4*a^3*b^8)*cos(d*x + c))*sin(d*x + c))/((a^8*b^7 - 4*a^6*b^9 + 6*a^4*b^11 - 4*a^2*b^13 + b^15)*
d*cos(d*x + c)^3 + 3*(a^9*b^6 - 4*a^7*b^8 + 6*a^5*b^10 - 4*a^3*b^12 + a*b^14)*d*cos(d*x + c)^2 + 3*(a^10*b^5 -
4*a^8*b^7 + 6*a^6*b^9 - 4*a^4*b^11 + a^2*b^13)*d*cos(d*x + c) + (a^11*b^4 - 4*a^9*b^6 + 6*a^7*b^8 - 4*a^5*b^1
0 + a^3*b^12)*d), 1/6*(6*(a^8*b^3 - 4*a^6*b^5 + 6*a^4*b^7 - 4*a^2*b^9 + b^11)*d*x*cos(d*x + c)^3 + 18*(a^9*b^2
- 4*a^7*b^4 + 6*a^5*b^6 - 4*a^3*b^8 + a*b^10)*d*x*cos(d*x + c)^2 + 18*(a^10*b - 4*a^8*b^3 + 6*a^6*b^5 - 4*a^4
*b^7 + a^2*b^9)*d*x*cos(d*x + c) + 6*(a^11 - 4*a^9*b^2 + 6*a^7*b^4 - 4*a^5*b^6 + a^3*b^8)*d*x - 3*(2*a^10 - 7*
a^8*b^2 + 8*a^6*b^4 - 8*a^4*b^6 + (2*a^7*b^3 - 7*a^5*b^5 + 8*a^3*b^7 - 8*a*b^9)*cos(d*x + c)^3 + 3*(2*a^8*b^2
- 7*a^6*b^4 + 8*a^4*b^6 - 8*a^2*b^8)*cos(d*x + c)^2 + 3*(2*a^9*b - 7*a^7*b^3 + 8*a^5*b^5 - 8*a^3*b^7)*cos(d*x
+ c))*sqrt(a^2 - b^2)*arctan(-(a*cos(d*x + c) + b)/(sqrt(a^2 - b^2)*sin(d*x + c))) - (6*a^10*b - 23*a^8*b^3 +
43*a^6*b^5 - 26*a^4*b^7 + (11*a^8*b^3 - 43*a^6*b^5 + 68*a^4*b^7 - 36*a^2*b^9)*cos(d*x + c)^2 + 15*(a^9*b^2 - 4
*a^7*b^4 + 7*a^5*b^6 - 4*a^3*b^8)*cos(d*x + c))*sin(d*x + c))/((a^8*b^7 - 4*a^6*b^9 + 6*a^4*b^11 - 4*a^2*b^13
+ b^15)*d*cos(d*x + c)^3 + 3*(a^9*b^6 - 4*a^7*b^8 + 6*a^5*b^10 - 4*a^3*b^12 + a*b^14)*d*cos(d*x + c)^2 + 3*(a^
10*b^5 - 4*a^8*b^7 + 6*a^6*b^9 - 4*a^4*b^11 + a^2*b^13)*d*cos(d*x + c) + (a^11*b^4 - 4*a^9*b^6 + 6*a^7*b^8 - 4
*a^5*b^10 + a^3*b^12)*d)]
Sympy [F(-1)]
Timed out. \[
\int \frac {\cos ^4(c+d x)}{(a+b \cos (c+d x))^4} \, dx=\text {Timed out}
\]
[In]
integrate(cos(d*x+c)**4/(a+b*cos(d*x+c))**4,x)
[Out]
Timed out
Maxima [F(-2)]
Exception generated. \[
\int \frac {\cos ^4(c+d x)}{(a+b \cos (c+d x))^4} \, dx=\text {Exception raised: ValueError}
\]
[In]
integrate(cos(d*x+c)^4/(a+b*cos(d*x+c))^4,x, algorithm="maxima")
[Out]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?`
for more de
Giac [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 531 vs. \(2 (235) = 470\).
Time = 0.35 (sec) , antiderivative size = 531, normalized size of antiderivative = 2.12
\[
\int \frac {\cos ^4(c+d x)}{(a+b \cos (c+d x))^4} \, dx=\frac {\frac {3 \, {\left (2 \, a^{7} - 7 \, a^{5} b^{2} + 8 \, a^{3} b^{4} - 8 \, a b^{6}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, a + 2 \, b\right ) + \arctan \left (-\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\sqrt {a^{2} - b^{2}}}\right )\right )}}{{\left (a^{6} b^{4} - 3 \, a^{4} b^{6} + 3 \, a^{2} b^{8} - b^{10}\right )} \sqrt {a^{2} - b^{2}}} - \frac {6 \, a^{8} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 15 \, a^{7} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 6 \, a^{6} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 45 \, a^{5} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 6 \, a^{4} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 60 \, a^{3} b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 36 \, a^{2} b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 12 \, a^{8} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 56 \, a^{6} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 116 \, a^{4} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 72 \, a^{2} b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, a^{8} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 15 \, a^{7} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 6 \, a^{6} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 45 \, a^{5} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 6 \, a^{4} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 60 \, a^{3} b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 36 \, a^{2} b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a^{6} b^{3} - 3 \, a^{4} b^{5} + 3 \, a^{2} b^{7} - b^{9}\right )} {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a + b\right )}^{3}} + \frac {3 \, {\left (d x + c\right )}}{b^{4}}}{3 \, d}
\]
[In]
integrate(cos(d*x+c)^4/(a+b*cos(d*x+c))^4,x, algorithm="giac")
[Out]
1/3*(3*(2*a^7 - 7*a^5*b^2 + 8*a^3*b^4 - 8*a*b^6)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(-2*a + 2*b) + arctan(-(
a*tan(1/2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*c))/sqrt(a^2 - b^2)))/((a^6*b^4 - 3*a^4*b^6 + 3*a^2*b^8 - b^10)*s
qrt(a^2 - b^2)) - (6*a^8*tan(1/2*d*x + 1/2*c)^5 - 15*a^7*b*tan(1/2*d*x + 1/2*c)^5 - 6*a^6*b^2*tan(1/2*d*x + 1/
2*c)^5 + 45*a^5*b^3*tan(1/2*d*x + 1/2*c)^5 - 6*a^4*b^4*tan(1/2*d*x + 1/2*c)^5 - 60*a^3*b^5*tan(1/2*d*x + 1/2*c
)^5 + 36*a^2*b^6*tan(1/2*d*x + 1/2*c)^5 + 12*a^8*tan(1/2*d*x + 1/2*c)^3 - 56*a^6*b^2*tan(1/2*d*x + 1/2*c)^3 +
116*a^4*b^4*tan(1/2*d*x + 1/2*c)^3 - 72*a^2*b^6*tan(1/2*d*x + 1/2*c)^3 + 6*a^8*tan(1/2*d*x + 1/2*c) + 15*a^7*b
*tan(1/2*d*x + 1/2*c) - 6*a^6*b^2*tan(1/2*d*x + 1/2*c) - 45*a^5*b^3*tan(1/2*d*x + 1/2*c) - 6*a^4*b^4*tan(1/2*d
*x + 1/2*c) + 60*a^3*b^5*tan(1/2*d*x + 1/2*c) + 36*a^2*b^6*tan(1/2*d*x + 1/2*c))/((a^6*b^3 - 3*a^4*b^5 + 3*a^2
*b^7 - b^9)*(a*tan(1/2*d*x + 1/2*c)^2 - b*tan(1/2*d*x + 1/2*c)^2 + a + b)^3) + 3*(d*x + c)/b^4)/d
Mupad [B] (verification not implemented)
Time = 27.41 (sec) , antiderivative size = 7247, normalized size of antiderivative = 28.99
\[
\int \frac {\cos ^4(c+d x)}{(a+b \cos (c+d x))^4} \, dx=\text {Too large to display}
\]
[In]
int(cos(c + d*x)^4/(a + b*cos(c + d*x))^4,x)
[Out]
(2*atan((((((8*(16*a*b^20 - 4*b^21 + 12*a^2*b^19 - 64*a^3*b^18 - 20*a^4*b^17 + 110*a^5*b^16 + 30*a^6*b^15 - 11
0*a^7*b^14 - 30*a^8*b^13 + 70*a^9*b^12 + 14*a^10*b^11 - 26*a^11*b^10 - 2*a^12*b^9 + 4*a^13*b^8))/(a*b^19 + b^2
0 - 5*a^2*b^18 - 5*a^3*b^17 + 10*a^4*b^16 + 10*a^5*b^15 - 10*a^6*b^14 - 10*a^7*b^13 + 5*a^8*b^12 + 5*a^9*b^11
- a^10*b^10 - a^11*b^9) - (tan(c/2 + (d*x)/2)*(8*a*b^21 - 8*a^2*b^20 - 48*a^3*b^19 + 48*a^4*b^18 + 120*a^5*b^1
7 - 120*a^6*b^16 - 160*a^7*b^15 + 160*a^8*b^14 + 120*a^9*b^13 - 120*a^10*b^12 - 48*a^11*b^11 + 48*a^12*b^10 +
8*a^13*b^9 - 8*a^14*b^8)*8i)/(b^4*(a*b^16 + b^17 - 5*a^2*b^15 - 5*a^3*b^14 + 10*a^4*b^13 + 10*a^5*b^12 - 10*a^
6*b^11 - 10*a^7*b^10 + 5*a^8*b^9 + 5*a^9*b^8 - a^10*b^7 - a^11*b^6)))*1i)/b^4 + (8*tan(c/2 + (d*x)/2)*(8*a^14
- 8*a^13*b - 8*a*b^13 + 4*b^14 + 44*a^2*b^12 + 48*a^3*b^11 - 92*a^4*b^10 - 120*a^5*b^9 + 156*a^6*b^8 + 160*a^7
*b^7 - 164*a^8*b^6 - 120*a^9*b^5 + 117*a^10*b^4 + 48*a^11*b^3 - 48*a^12*b^2))/(a*b^16 + b^17 - 5*a^2*b^15 - 5*
a^3*b^14 + 10*a^4*b^13 + 10*a^5*b^12 - 10*a^6*b^11 - 10*a^7*b^10 + 5*a^8*b^9 + 5*a^9*b^8 - a^10*b^7 - a^11*b^6
))/b^4 - ((((8*(16*a*b^20 - 4*b^21 + 12*a^2*b^19 - 64*a^3*b^18 - 20*a^4*b^17 + 110*a^5*b^16 + 30*a^6*b^15 - 11
0*a^7*b^14 - 30*a^8*b^13 + 70*a^9*b^12 + 14*a^10*b^11 - 26*a^11*b^10 - 2*a^12*b^9 + 4*a^13*b^8))/(a*b^19 + b^2
0 - 5*a^2*b^18 - 5*a^3*b^17 + 10*a^4*b^16 + 10*a^5*b^15 - 10*a^6*b^14 - 10*a^7*b^13 + 5*a^8*b^12 + 5*a^9*b^11
- a^10*b^10 - a^11*b^9) + (tan(c/2 + (d*x)/2)*(8*a*b^21 - 8*a^2*b^20 - 48*a^3*b^19 + 48*a^4*b^18 + 120*a^5*b^1
7 - 120*a^6*b^16 - 160*a^7*b^15 + 160*a^8*b^14 + 120*a^9*b^13 - 120*a^10*b^12 - 48*a^11*b^11 + 48*a^12*b^10 +
8*a^13*b^9 - 8*a^14*b^8)*8i)/(b^4*(a*b^16 + b^17 - 5*a^2*b^15 - 5*a^3*b^14 + 10*a^4*b^13 + 10*a^5*b^12 - 10*a^
6*b^11 - 10*a^7*b^10 + 5*a^8*b^9 + 5*a^9*b^8 - a^10*b^7 - a^11*b^6)))*1i)/b^4 - (8*tan(c/2 + (d*x)/2)*(8*a^14
- 8*a^13*b - 8*a*b^13 + 4*b^14 + 44*a^2*b^12 + 48*a^3*b^11 - 92*a^4*b^10 - 120*a^5*b^9 + 156*a^6*b^8 + 160*a^7
*b^7 - 164*a^8*b^6 - 120*a^9*b^5 + 117*a^10*b^4 + 48*a^11*b^3 - 48*a^12*b^2))/(a*b^16 + b^17 - 5*a^2*b^15 - 5*
a^3*b^14 + 10*a^4*b^13 + 10*a^5*b^12 - 10*a^6*b^11 - 10*a^7*b^10 + 5*a^8*b^9 + 5*a^9*b^8 - a^10*b^7 - a^11*b^6
))/b^4)/((((((8*(16*a*b^20 - 4*b^21 + 12*a^2*b^19 - 64*a^3*b^18 - 20*a^4*b^17 + 110*a^5*b^16 + 30*a^6*b^15 - 1
10*a^7*b^14 - 30*a^8*b^13 + 70*a^9*b^12 + 14*a^10*b^11 - 26*a^11*b^10 - 2*a^12*b^9 + 4*a^13*b^8))/(a*b^19 + b^
20 - 5*a^2*b^18 - 5*a^3*b^17 + 10*a^4*b^16 + 10*a^5*b^15 - 10*a^6*b^14 - 10*a^7*b^13 + 5*a^8*b^12 + 5*a^9*b^11
- a^10*b^10 - a^11*b^9) - (tan(c/2 + (d*x)/2)*(8*a*b^21 - 8*a^2*b^20 - 48*a^3*b^19 + 48*a^4*b^18 + 120*a^5*b^
17 - 120*a^6*b^16 - 160*a^7*b^15 + 160*a^8*b^14 + 120*a^9*b^13 - 120*a^10*b^12 - 48*a^11*b^11 + 48*a^12*b^10 +
8*a^13*b^9 - 8*a^14*b^8)*8i)/(b^4*(a*b^16 + b^17 - 5*a^2*b^15 - 5*a^3*b^14 + 10*a^4*b^13 + 10*a^5*b^12 - 10*a
^6*b^11 - 10*a^7*b^10 + 5*a^8*b^9 + 5*a^9*b^8 - a^10*b^7 - a^11*b^6)))*1i)/b^4 + (8*tan(c/2 + (d*x)/2)*(8*a^14
- 8*a^13*b - 8*a*b^13 + 4*b^14 + 44*a^2*b^12 + 48*a^3*b^11 - 92*a^4*b^10 - 120*a^5*b^9 + 156*a^6*b^8 + 160*a^
7*b^7 - 164*a^8*b^6 - 120*a^9*b^5 + 117*a^10*b^4 + 48*a^11*b^3 - 48*a^12*b^2))/(a*b^16 + b^17 - 5*a^2*b^15 - 5
*a^3*b^14 + 10*a^4*b^13 + 10*a^5*b^12 - 10*a^6*b^11 - 10*a^7*b^10 + 5*a^8*b^9 + 5*a^9*b^8 - a^10*b^7 - a^11*b^
6))*1i)/b^4 + (((((8*(16*a*b^20 - 4*b^21 + 12*a^2*b^19 - 64*a^3*b^18 - 20*a^4*b^17 + 110*a^5*b^16 + 30*a^6*b^1
5 - 110*a^7*b^14 - 30*a^8*b^13 + 70*a^9*b^12 + 14*a^10*b^11 - 26*a^11*b^10 - 2*a^12*b^9 + 4*a^13*b^8))/(a*b^19
+ b^20 - 5*a^2*b^18 - 5*a^3*b^17 + 10*a^4*b^16 + 10*a^5*b^15 - 10*a^6*b^14 - 10*a^7*b^13 + 5*a^8*b^12 + 5*a^9
*b^11 - a^10*b^10 - a^11*b^9) + (tan(c/2 + (d*x)/2)*(8*a*b^21 - 8*a^2*b^20 - 48*a^3*b^19 + 48*a^4*b^18 + 120*a
^5*b^17 - 120*a^6*b^16 - 160*a^7*b^15 + 160*a^8*b^14 + 120*a^9*b^13 - 120*a^10*b^12 - 48*a^11*b^11 + 48*a^12*b
^10 + 8*a^13*b^9 - 8*a^14*b^8)*8i)/(b^4*(a*b^16 + b^17 - 5*a^2*b^15 - 5*a^3*b^14 + 10*a^4*b^13 + 10*a^5*b^12 -
10*a^6*b^11 - 10*a^7*b^10 + 5*a^8*b^9 + 5*a^9*b^8 - a^10*b^7 - a^11*b^6)))*1i)/b^4 - (8*tan(c/2 + (d*x)/2)*(8
*a^14 - 8*a^13*b - 8*a*b^13 + 4*b^14 + 44*a^2*b^12 + 48*a^3*b^11 - 92*a^4*b^10 - 120*a^5*b^9 + 156*a^6*b^8 + 1
60*a^7*b^7 - 164*a^8*b^6 - 120*a^9*b^5 + 117*a^10*b^4 + 48*a^11*b^3 - 48*a^12*b^2))/(a*b^16 + b^17 - 5*a^2*b^1
5 - 5*a^3*b^14 + 10*a^4*b^13 + 10*a^5*b^12 - 10*a^6*b^11 - 10*a^7*b^10 + 5*a^8*b^9 + 5*a^9*b^8 - a^10*b^7 - a^
11*b^6))*1i)/b^4 + (16*(16*a*b^12 - 2*a^12*b + 4*a^13 + 48*a^2*b^11 - 64*a^3*b^10 - 64*a^4*b^9 + 110*a^5*b^8 +
66*a^6*b^7 - 110*a^7*b^6 - 34*a^8*b^5 + 70*a^9*b^4 + 11*a^10*b^3 - 26*a^11*b^2))/(a*b^19 + b^20 - 5*a^2*b^18
- 5*a^3*b^17 + 10*a^4*b^16 + 10*a^5*b^15 - 10*a^6*b^14 - 10*a^7*b^13 + 5*a^8*b^12 + 5*a^9*b^11 - a^10*b^10 - a
^11*b^9))))/(b^4*d) - ((tan(c/2 + (d*x)/2)^5*(2*a^6 - a^5*b + 12*a^2*b^4 + 4*a^3*b^3 - 6*a^4*b^2))/((a*b^3 - b
^4)*(a + b)^3) + (4*tan(c/2 + (d*x)/2)^3*(3*a^6 + 18*a^2*b^4 - 11*a^4*b^2))/(3*(a + b)^2*(b^5 - 2*a*b^4 + a^2*
b^3)) + (tan(c/2 + (d*x)/2)*(a^5*b + 2*a^6 + 12*a^2*b^4 - 4*a^3*b^3 - 6*a^4*b^2))/((a + b)*(3*a*b^5 - b^6 - 3*
a^2*b^4 + a^3*b^3)))/(d*(3*a*b^2 - tan(c/2 + (d*x)/2)^4*(3*a*b^2 + 3*a^2*b - 3*a^3 - 3*b^3) - tan(c/2 + (d*x)/
2)^2*(3*a*b^2 - 3*a^2*b - 3*a^3 + 3*b^3) + 3*a^2*b + a^3 + b^3 + tan(c/2 + (d*x)/2)^6*(3*a*b^2 - 3*a^2*b + a^3
- b^3))) + (a*atan(((a*((8*tan(c/2 + (d*x)/2)*(8*a^14 - 8*a^13*b - 8*a*b^13 + 4*b^14 + 44*a^2*b^12 + 48*a^3*b
^11 - 92*a^4*b^10 - 120*a^5*b^9 + 156*a^6*b^8 + 160*a^7*b^7 - 164*a^8*b^6 - 120*a^9*b^5 + 117*a^10*b^4 + 48*a^
11*b^3 - 48*a^12*b^2))/(a*b^16 + b^17 - 5*a^2*b^15 - 5*a^3*b^14 + 10*a^4*b^13 + 10*a^5*b^12 - 10*a^6*b^11 - 10
*a^7*b^10 + 5*a^8*b^9 + 5*a^9*b^8 - a^10*b^7 - a^11*b^6) + (a*((8*(16*a*b^20 - 4*b^21 + 12*a^2*b^19 - 64*a^3*b
^18 - 20*a^4*b^17 + 110*a^5*b^16 + 30*a^6*b^15 - 110*a^7*b^14 - 30*a^8*b^13 + 70*a^9*b^12 + 14*a^10*b^11 - 26*
a^11*b^10 - 2*a^12*b^9 + 4*a^13*b^8))/(a*b^19 + b^20 - 5*a^2*b^18 - 5*a^3*b^17 + 10*a^4*b^16 + 10*a^5*b^15 - 1
0*a^6*b^14 - 10*a^7*b^13 + 5*a^8*b^12 + 5*a^9*b^11 - a^10*b^10 - a^11*b^9) - (4*a*tan(c/2 + (d*x)/2)*(-(a + b)
^7*(a - b)^7)^(1/2)*(2*a^6 - 8*b^6 + 8*a^2*b^4 - 7*a^4*b^2)*(8*a*b^21 - 8*a^2*b^20 - 48*a^3*b^19 + 48*a^4*b^18
+ 120*a^5*b^17 - 120*a^6*b^16 - 160*a^7*b^15 + 160*a^8*b^14 + 120*a^9*b^13 - 120*a^10*b^12 - 48*a^11*b^11 + 4
8*a^12*b^10 + 8*a^13*b^9 - 8*a^14*b^8))/((b^18 - 7*a^2*b^16 + 21*a^4*b^14 - 35*a^6*b^12 + 35*a^8*b^10 - 21*a^1
0*b^8 + 7*a^12*b^6 - a^14*b^4)*(a*b^16 + b^17 - 5*a^2*b^15 - 5*a^3*b^14 + 10*a^4*b^13 + 10*a^5*b^12 - 10*a^6*b
^11 - 10*a^7*b^10 + 5*a^8*b^9 + 5*a^9*b^8 - a^10*b^7 - a^11*b^6)))*(-(a + b)^7*(a - b)^7)^(1/2)*(2*a^6 - 8*b^6
+ 8*a^2*b^4 - 7*a^4*b^2))/(2*(b^18 - 7*a^2*b^16 + 21*a^4*b^14 - 35*a^6*b^12 + 35*a^8*b^10 - 21*a^10*b^8 + 7*a
^12*b^6 - a^14*b^4)))*(-(a + b)^7*(a - b)^7)^(1/2)*(2*a^6 - 8*b^6 + 8*a^2*b^4 - 7*a^4*b^2)*1i)/(2*(b^18 - 7*a^
2*b^16 + 21*a^4*b^14 - 35*a^6*b^12 + 35*a^8*b^10 - 21*a^10*b^8 + 7*a^12*b^6 - a^14*b^4)) + (a*((8*tan(c/2 + (d
*x)/2)*(8*a^14 - 8*a^13*b - 8*a*b^13 + 4*b^14 + 44*a^2*b^12 + 48*a^3*b^11 - 92*a^4*b^10 - 120*a^5*b^9 + 156*a^
6*b^8 + 160*a^7*b^7 - 164*a^8*b^6 - 120*a^9*b^5 + 117*a^10*b^4 + 48*a^11*b^3 - 48*a^12*b^2))/(a*b^16 + b^17 -
5*a^2*b^15 - 5*a^3*b^14 + 10*a^4*b^13 + 10*a^5*b^12 - 10*a^6*b^11 - 10*a^7*b^10 + 5*a^8*b^9 + 5*a^9*b^8 - a^10
*b^7 - a^11*b^6) - (a*((8*(16*a*b^20 - 4*b^21 + 12*a^2*b^19 - 64*a^3*b^18 - 20*a^4*b^17 + 110*a^5*b^16 + 30*a^
6*b^15 - 110*a^7*b^14 - 30*a^8*b^13 + 70*a^9*b^12 + 14*a^10*b^11 - 26*a^11*b^10 - 2*a^12*b^9 + 4*a^13*b^8))/(a
*b^19 + b^20 - 5*a^2*b^18 - 5*a^3*b^17 + 10*a^4*b^16 + 10*a^5*b^15 - 10*a^6*b^14 - 10*a^7*b^13 + 5*a^8*b^12 +
5*a^9*b^11 - a^10*b^10 - a^11*b^9) + (4*a*tan(c/2 + (d*x)/2)*(-(a + b)^7*(a - b)^7)^(1/2)*(2*a^6 - 8*b^6 + 8*a
^2*b^4 - 7*a^4*b^2)*(8*a*b^21 - 8*a^2*b^20 - 48*a^3*b^19 + 48*a^4*b^18 + 120*a^5*b^17 - 120*a^6*b^16 - 160*a^7
*b^15 + 160*a^8*b^14 + 120*a^9*b^13 - 120*a^10*b^12 - 48*a^11*b^11 + 48*a^12*b^10 + 8*a^13*b^9 - 8*a^14*b^8))/
((b^18 - 7*a^2*b^16 + 21*a^4*b^14 - 35*a^6*b^12 + 35*a^8*b^10 - 21*a^10*b^8 + 7*a^12*b^6 - a^14*b^4)*(a*b^16 +
b^17 - 5*a^2*b^15 - 5*a^3*b^14 + 10*a^4*b^13 + 10*a^5*b^12 - 10*a^6*b^11 - 10*a^7*b^10 + 5*a^8*b^9 + 5*a^9*b^
8 - a^10*b^7 - a^11*b^6)))*(-(a + b)^7*(a - b)^7)^(1/2)*(2*a^6 - 8*b^6 + 8*a^2*b^4 - 7*a^4*b^2))/(2*(b^18 - 7*
a^2*b^16 + 21*a^4*b^14 - 35*a^6*b^12 + 35*a^8*b^10 - 21*a^10*b^8 + 7*a^12*b^6 - a^14*b^4)))*(-(a + b)^7*(a - b
)^7)^(1/2)*(2*a^6 - 8*b^6 + 8*a^2*b^4 - 7*a^4*b^2)*1i)/(2*(b^18 - 7*a^2*b^16 + 21*a^4*b^14 - 35*a^6*b^12 + 35*
a^8*b^10 - 21*a^10*b^8 + 7*a^12*b^6 - a^14*b^4)))/((16*(16*a*b^12 - 2*a^12*b + 4*a^13 + 48*a^2*b^11 - 64*a^3*b
^10 - 64*a^4*b^9 + 110*a^5*b^8 + 66*a^6*b^7 - 110*a^7*b^6 - 34*a^8*b^5 + 70*a^9*b^4 + 11*a^10*b^3 - 26*a^11*b^
2))/(a*b^19 + b^20 - 5*a^2*b^18 - 5*a^3*b^17 + 10*a^4*b^16 + 10*a^5*b^15 - 10*a^6*b^14 - 10*a^7*b^13 + 5*a^8*b
^12 + 5*a^9*b^11 - a^10*b^10 - a^11*b^9) + (a*((8*tan(c/2 + (d*x)/2)*(8*a^14 - 8*a^13*b - 8*a*b^13 + 4*b^14 +
44*a^2*b^12 + 48*a^3*b^11 - 92*a^4*b^10 - 120*a^5*b^9 + 156*a^6*b^8 + 160*a^7*b^7 - 164*a^8*b^6 - 120*a^9*b^5
+ 117*a^10*b^4 + 48*a^11*b^3 - 48*a^12*b^2))/(a*b^16 + b^17 - 5*a^2*b^15 - 5*a^3*b^14 + 10*a^4*b^13 + 10*a^5*b
^12 - 10*a^6*b^11 - 10*a^7*b^10 + 5*a^8*b^9 + 5*a^9*b^8 - a^10*b^7 - a^11*b^6) + (a*((8*(16*a*b^20 - 4*b^21 +
12*a^2*b^19 - 64*a^3*b^18 - 20*a^4*b^17 + 110*a^5*b^16 + 30*a^6*b^15 - 110*a^7*b^14 - 30*a^8*b^13 + 70*a^9*b^1
2 + 14*a^10*b^11 - 26*a^11*b^10 - 2*a^12*b^9 + 4*a^13*b^8))/(a*b^19 + b^20 - 5*a^2*b^18 - 5*a^3*b^17 + 10*a^4*
b^16 + 10*a^5*b^15 - 10*a^6*b^14 - 10*a^7*b^13 + 5*a^8*b^12 + 5*a^9*b^11 - a^10*b^10 - a^11*b^9) - (4*a*tan(c/
2 + (d*x)/2)*(-(a + b)^7*(a - b)^7)^(1/2)*(2*a^6 - 8*b^6 + 8*a^2*b^4 - 7*a^4*b^2)*(8*a*b^21 - 8*a^2*b^20 - 48*
a^3*b^19 + 48*a^4*b^18 + 120*a^5*b^17 - 120*a^6*b^16 - 160*a^7*b^15 + 160*a^8*b^14 + 120*a^9*b^13 - 120*a^10*b
^12 - 48*a^11*b^11 + 48*a^12*b^10 + 8*a^13*b^9 - 8*a^14*b^8))/((b^18 - 7*a^2*b^16 + 21*a^4*b^14 - 35*a^6*b^12
+ 35*a^8*b^10 - 21*a^10*b^8 + 7*a^12*b^6 - a^14*b^4)*(a*b^16 + b^17 - 5*a^2*b^15 - 5*a^3*b^14 + 10*a^4*b^13 +
10*a^5*b^12 - 10*a^6*b^11 - 10*a^7*b^10 + 5*a^8*b^9 + 5*a^9*b^8 - a^10*b^7 - a^11*b^6)))*(-(a + b)^7*(a - b)^7
)^(1/2)*(2*a^6 - 8*b^6 + 8*a^2*b^4 - 7*a^4*b^2))/(2*(b^18 - 7*a^2*b^16 + 21*a^4*b^14 - 35*a^6*b^12 + 35*a^8*b^
10 - 21*a^10*b^8 + 7*a^12*b^6 - a^14*b^4)))*(-(a + b)^7*(a - b)^7)^(1/2)*(2*a^6 - 8*b^6 + 8*a^2*b^4 - 7*a^4*b^
2))/(2*(b^18 - 7*a^2*b^16 + 21*a^4*b^14 - 35*a^6*b^12 + 35*a^8*b^10 - 21*a^10*b^8 + 7*a^12*b^6 - a^14*b^4)) -
(a*((8*tan(c/2 + (d*x)/2)*(8*a^14 - 8*a^13*b - 8*a*b^13 + 4*b^14 + 44*a^2*b^12 + 48*a^3*b^11 - 92*a^4*b^10 - 1
20*a^5*b^9 + 156*a^6*b^8 + 160*a^7*b^7 - 164*a^8*b^6 - 120*a^9*b^5 + 117*a^10*b^4 + 48*a^11*b^3 - 48*a^12*b^2)
)/(a*b^16 + b^17 - 5*a^2*b^15 - 5*a^3*b^14 + 10*a^4*b^13 + 10*a^5*b^12 - 10*a^6*b^11 - 10*a^7*b^10 + 5*a^8*b^9
+ 5*a^9*b^8 - a^10*b^7 - a^11*b^6) - (a*((8*(16*a*b^20 - 4*b^21 + 12*a^2*b^19 - 64*a^3*b^18 - 20*a^4*b^17 + 1
10*a^5*b^16 + 30*a^6*b^15 - 110*a^7*b^14 - 30*a^8*b^13 + 70*a^9*b^12 + 14*a^10*b^11 - 26*a^11*b^10 - 2*a^12*b^
9 + 4*a^13*b^8))/(a*b^19 + b^20 - 5*a^2*b^18 - 5*a^3*b^17 + 10*a^4*b^16 + 10*a^5*b^15 - 10*a^6*b^14 - 10*a^7*b
^13 + 5*a^8*b^12 + 5*a^9*b^11 - a^10*b^10 - a^11*b^9) + (4*a*tan(c/2 + (d*x)/2)*(-(a + b)^7*(a - b)^7)^(1/2)*(
2*a^6 - 8*b^6 + 8*a^2*b^4 - 7*a^4*b^2)*(8*a*b^21 - 8*a^2*b^20 - 48*a^3*b^19 + 48*a^4*b^18 + 120*a^5*b^17 - 120
*a^6*b^16 - 160*a^7*b^15 + 160*a^8*b^14 + 120*a^9*b^13 - 120*a^10*b^12 - 48*a^11*b^11 + 48*a^12*b^10 + 8*a^13*
b^9 - 8*a^14*b^8))/((b^18 - 7*a^2*b^16 + 21*a^4*b^14 - 35*a^6*b^12 + 35*a^8*b^10 - 21*a^10*b^8 + 7*a^12*b^6 -
a^14*b^4)*(a*b^16 + b^17 - 5*a^2*b^15 - 5*a^3*b^14 + 10*a^4*b^13 + 10*a^5*b^12 - 10*a^6*b^11 - 10*a^7*b^10 + 5
*a^8*b^9 + 5*a^9*b^8 - a^10*b^7 - a^11*b^6)))*(-(a + b)^7*(a - b)^7)^(1/2)*(2*a^6 - 8*b^6 + 8*a^2*b^4 - 7*a^4*
b^2))/(2*(b^18 - 7*a^2*b^16 + 21*a^4*b^14 - 35*a^6*b^12 + 35*a^8*b^10 - 21*a^10*b^8 + 7*a^12*b^6 - a^14*b^4)))
*(-(a + b)^7*(a - b)^7)^(1/2)*(2*a^6 - 8*b^6 + 8*a^2*b^4 - 7*a^4*b^2))/(2*(b^18 - 7*a^2*b^16 + 21*a^4*b^14 - 3
5*a^6*b^12 + 35*a^8*b^10 - 21*a^10*b^8 + 7*a^12*b^6 - a^14*b^4))))*(-(a + b)^7*(a - b)^7)^(1/2)*(2*a^6 - 8*b^6
+ 8*a^2*b^4 - 7*a^4*b^2)*1i)/(d*(b^18 - 7*a^2*b^16 + 21*a^4*b^14 - 35*a^6*b^12 + 35*a^8*b^10 - 21*a^10*b^8 +
7*a^12*b^6 - a^14*b^4))